<!DOCTYPE html>
<html lang="en">
	<head>
		<title> New Document </title>
		<meta charset="utf-8">
		<meta name="Author" content="">
		<meta name="Keywords" content="">
		<meta name="Description" content="">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<!-- Bootstrap -->
		<link href="${webRoot}resources/css/bootstrap.min.css" rel="stylesheet" media="screen">
		<link href="${webRoot}resources/css/style.css" rel="stylesheet">
		<script src="http://code.jquery.com/jquery-1.10.0.min.js"></script>
	</head>
<body class="main">
	<div class="wrap add-shop">
	<ul class="breadcrumb">
		    <li><span id="test">您当前的位置：</span><a href="#">首页</a> <span class="divider">>></span></li>
		    <li class="active">${addComment}</li>
	    </ul>
		<form class="form-horizontal" method="post"
			action="${webRoot}comment/addCommentInfo.do" id="groupInfo">
		<input type="hidden" id="goods_Id" name="goods_Id" value="${goods_Id}">
		<input type="hidden" id="goods_name" name="goods_name" value="${goods_name}">
		 <div class="control-group">
		    <label class="control-label" for="goods_name">商铺名称</label>
		    <div class="controls">
		    <input type="text" id="goods_name" name="goods_name" value="${goods_name}" disabled="disabled">
		    </div>
		  </div>	
		  <div class="control-group">
		    <label class="control-label" for="comment_price">点评价格</label>
		    <div class="controls">
		      <input type="number" id="comment_price" name="comment_price">
		    </div>
		  </div>
		   <div class="control-group">
		    <label class="control-label" for="comment_code">评分</label>
		    <div class="controls">
		      <input type="number" id="comment_code" name="comment_code">
		    </div>
		  </div>
		  <div class="control-group">
		    <label class="control-label" for="comment_Content">点评内容</label>
		    <div class="controls">
		      <textarea rows="3" id="comment_Content" name="comment_Content"></textarea>
		    </div>
		  </div>
		  <div class="control-group">
		    <div class="controls">
		      <button type="button" class="btn" onclick="checkContext()">确认添加</button>
		    </div>
		  </div>
		</form>			 	
	</div>			
	<script src="${webRoot}resources/js/jquery-1.9.1.min.js"></script>
	<script src="${webRoot}resources/js/bootstrap.min.js"></script>
	<script src="${webRoot}resources/js/js.js"></script>
    <script type="text/javascript">
        function checkContext(){
        	var comment_price = $("#comment_price").val();
        	if($.trim(comment_price) == null ||$.trim(comment_price) =="" ){
        		alert("点评价格不能为空！");
        		return;
        	}
        	var comment_code = $("#comment_code").val();
        	if($.trim(comment_code) == null ||$.trim(comment_code) =="" ){
        		alert("评分不能为空！");
        		return;
        	}
        	
        	var comment_Content = $("#comment_Content").val();
        	if($.trim(comment_Content) == null ||$.trim(comment_Content) =="" ){
        		alert("点评内容不能为空！");
        		return;
        	}
        	document.getElementById("groupInfo").submit();
        }
    </script>

</body>
</html>
